Skip to main content

Configuration File Format

Hridaya uses YAML format for configuration. The file must be named config.yaml and placed in the project root directory.

LIMITS Section

Defines rate limiting parameters for Steam API compliance.

Structure

LIMITS:
  REQUESTS: 15
  WINDOW_SECONDS: 60

Parameters

LIMITS.REQUESTS
integer
required
Maximum number of API requests allowed within the time window.Recommended: Start with 15-20 requests per minute. Steam’s actual limits are not publicly documented, so conservative values are safer.Validation: Must be positive integer greater than 0.
LIMITS.WINDOW_SECONDS
integer
required
Duration of the rate limiting window in seconds.Default: 60 seconds (1 minute)Common values:
  • 60 - Per-minute limiting
  • 300 - Per-5-minute limiting
  • 3600 - Per-hour limiting
Validation: Must be positive integer greater than 0.

TRACKING_ITEMS Section

Defines the list of Steam Community Market items to track.

Structure

TRACKING_ITEMS:
  - market_hash_name: "AK-47 | Redline (Field-Tested)"
    appid: 730
    currency: 1
    country: 'US'
    language: 'english'
    polling-interval-in-seconds: 30
    apiid: 'priceoverview'
    item_nameid: 176582392  # Required for some endpoints

Universal Required Parameters

These parameters are required for all tracked items regardless of endpoint:
market_hash_name
string
required
Exact Steam Community Market item name. Must match Steam’s market listing exactly, including special characters and capitalization.Examples:
  • "AK-47 | Redline (Field-Tested)"
  • "Revolution Case"
  • "AWP | Neo-Noir (Factory New)"
  • "Sticker | Team Liquid | Paris 2023"
Finding the name:
  1. Navigate to the item’s Steam market page
  2. The name appears in the page title and URL (URL-encoded)
  3. Copy exactly as displayed
Wear conditions (Factory New, Minimal Wear, etc.) and StatTrak™ prefixes must be included exactly.
appid
integer
required
Steam Application ID identifying which game/app this item belongs to.Popular App IDs:
App IDGame/Application
730Counter-Strike 2 (CS2)
570Dota 2
440Team Fortress 2
252490Rust
753Steam (trading cards, backgrounds, emoticons)
433850Blackwake
578080PUBG
Finding App IDs:
  • Check the item’s market URL: steamcommunity.com/market/listings/{appid}/{item_name}
  • Visit SteamDB and search for the game
apiid
string
required
Identifies which Steam API endpoint to use for this item.Valid values:
  • priceoverview - Current prices and 24h volume
  • itemordershistogram - Full order book (buy/sell orders)
  • itemordersactivity - Recent trade activity feed
  • pricehistory - Historical hourly price data
Validation: Must be exactly one of the four values above. See API Endpoints for detailed comparison.
Choose the endpoint based on your use case:
  • Day trading: itemordersactivity
  • Price analysis: priceoverview
  • Market depth: itemordershistogram
  • Historical trends: pricehistory
polling-interval-in-seconds
integer
required
How frequently to fetch data for this item, in seconds.Minimum recommended: 8 seconds (for high-frequency trading)Common values:
  • 8 - Very high frequency (volatile items)
  • 30 - Medium frequency (active items)
  • 60 - Standard frequency (regular monitoring)
  • 300 - Low frequency (5 minutes)
  • 3600 - Hourly (historical data, pricehistory endpoint)
Validation: Must be positive integer. Lower values consume more rate limit capacity.
Total request load across all items must not exceed your LIMITS.REQUESTS per LIMITS.WINDOW_SECONDS. The system validates this at startup.

Endpoint-Specific Required Parameters

item_nameid
integer
Steam’s internal numeric item identifier.Required for:
  • itemordershistogram
  • itemordersactivity
Not required for:
  • priceoverview
  • pricehistory
Finding item_nameid:
  1. Open the item’s market page in your browser
  2. Open browser developer tools (F12)
  3. Go to Network tab
  4. Refresh the page
  5. Look for requests to itemordershistogram or similar
  6. The item_nameid parameter appears in the request URL
Example: For “AK-47 | Redline (Field-Tested)”, the item_nameid might be 176582392
The item_nameid is stable for each item - you only need to find it once.

Optional Parameters

These parameters have sensible defaults but can be customized:
currency
integer
default:"1"
Steam currency code for price data.Common currency codes:
CodeCurrency
1USD (US Dollar)
2GBP (British Pound)
3EUR (Euro)
5RUB (Russian Ruble)
6BRL (Brazilian Real)
9NOK (Norwegian Krone)
10IDR (Indonesian Rupiah)
11MYR (Malaysian Ringgit)
12PHP (Philippine Peso)
13SGD (Singapore Dollar)
14THB (Thai Baht)
15VND (Vietnamese Dong)
16KRW (Korean Won)
17TRY (Turkish Lira)
18UAH (Ukrainian Hryvnia)
19MXN (Mexican Peso)
20CAD (Canadian Dollar)
21AUD (Australian Dollar)
22NZD (New Zealand Dollar)
23CNY (Chinese Yuan)
24INR (Indian Rupee)
25CLP (Chilean Peso)
26PEN (Peruvian Sol)
27COP (Colombian Peso)
28ZAR (South African Rand)
29HKD (Hong Kong Dollar)
30TWD (Taiwan Dollar)
31SAR (Saudi Riyal)
32AED (UAE Dirham)
Prices are returned in the selected currency. For cross-currency analysis, track the same item with different currency codes.
country
string
default:"US"
Two-letter ISO country code for region-specific pricing.Common values:
  • US - United States
  • GB - United Kingdom
  • DE - Germany
  • FR - France
  • CN - China
  • IN - India
  • BR - Brazil
  • RU - Russia
Format: Must be 2-character uppercase ISO 3166-1 alpha-2 code
language
string
default:"english"
Language for API response text fields.Common values:
  • english
  • spanish
  • french
  • german
  • italian
  • portuguese
  • russian
  • chinese
  • japanese
  • korean
Note: Primarily affects activity descriptions in itemordersactivity endpoint. Price data is numeric and unaffected.

Complete Example

# config.yaml - Complete example configuration

LIMITS:
  REQUESTS: 15
  WINDOW_SECONDS: 60

TRACKING_ITEMS:
  # High-frequency trading: Track order activity every 8 seconds
  - market_hash_name: "Revolution Case"
    appid: 730
    currency: 1
    country: 'US'
    language: 'english'
    polling-interval-in-seconds: 8
    apiid: 'itemordersactivity'
    item_nameid: 175995756

  # Historical analysis: Fetch price history hourly
  - market_hash_name: "AWP | Neo-Noir (Factory New)"
    appid: 730
    currency: 3  # EUR
    country: 'DE'
    language: 'german'
    polling-interval-in-seconds: 3600  # 1 hour
    apiid: 'pricehistory'

  # Order book monitoring: Check depth every 30 seconds
  - market_hash_name: "Dreams & Nightmares Case"
    appid: 730
    currency: 2  # GBP
    country: 'GB'
    language: 'english'
    polling-interval-in-seconds: 30
    apiid: 'itemordershistogram'
    item_nameid: 175985258

  # Simple price tracking: Monitor current prices every minute
  - market_hash_name: "MP9 | Starlight Protector (Field-Tested)"
    appid: 730
    currency: 1
    country: 'US'
    language: 'english'
    polling-interval-in-seconds: 60
    apiid: 'priceoverview'

Validation Error Examples

Missing Required Field

TRACKING_ITEMS:
  - market_hash_name: "Revolution Case"
    appid: 730
    # Missing: apiid, polling-interval-in-seconds
Error Output:
❌ CONFIG ERROR: Item 1 missing required field 'apiid'
   Item: {'market_hash_name': 'Revolution Case', 'appid': 730}

Invalid apiid

TRACKING_ITEMS:
  - market_hash_name: "Revolution Case"
    apiid: 'invalid_endpoint'  # Wrong!
Error Output:
❌ CONFIG ERROR: Item 1 has invalid apiid 'invalid_endpoint'
   Valid options: priceoverview, itemordershistogram, itemordersactivity, pricehistory

Missing Endpoint-Specific Field

TRACKING_ITEMS:
  - market_hash_name: "Revolution Case"
    apiid: 'itemordershistogram'
    # Missing: item_nameid (required for this endpoint)
Error Output:
❌ CONFIG ERROR: Item 1 missing 'item_nameid' (required for itemordershistogram)
   Item: Revolution Case

Infeasible Rate Limit Configuration

LIMITS:
  REQUESTS: 5  # Too low!
  WINDOW_SECONDS: 60

TRACKING_ITEMS:
  - polling-interval-in-seconds: 8  # 7.5 req/window
  - polling-interval-in-seconds: 8  # 7.5 req/window
  # Total: 15 req/60s, but limit is only 5!
Error Output:
❌ CONFIG ERROR: Infeasible configuration
   Calculated: 15 requests per 60s
   Limit: 5 requests per 60s
   Adjust polling intervals or reduce tracked items

Validation Rules Summary

The system validates configurations using these rules (from cerebro.py:validate_required_fields and cerebro.py:validate_config_feasibility):
  1. Required field check: All universal required fields must be present
  2. apiid validation: Must be one of the four valid endpoint identifiers
  3. Endpoint-specific check: item_nameid required for histogram/activity endpoints
  4. Feasibility check: Total request load must not exceed rate limits
  5. Type validation: Fields must have correct types (integers, strings)
The system performs fail-fast validation - it exits immediately on the first error with a descriptive message. Fix errors one at a time and restart.

Next Steps

API Endpoints

Understand the four Steam API endpoints

Authentication

Setup cookies for pricehistory endpoint